package container.set;

import java.util.HashSet;
import java.util.Set;

public class TestHashSet1
{
    public static void main (String[] args)
    {
        Set<User> hashSet1 = new HashSet<>();
        
        User user1 = new User(21, "chen");
        User user2 = new User(18, "lu");
        User user3 = new User(18, "lu");
        
        hashSet1.add(user1);
        hashSet1.add(user2);
        hashSet1.add(user3);
        
        for(User temp: hashSet1)
        {
            System.out.println(temp);
        }
    }
}

